package com.project.erp.model.system;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.project.erp.model.IdEntity;

/**
 * 
 * COPYRIGHT (C) 2013 BY XXX公司
 * 
 * 功能模块名：系统参数主表
 * 
 * 功能描述：设置系统参数key,value值
 * 
 * @author LiJiaGuo
 * 
 * @version 1.0
 * 
 * @created 2013-11-10 下午3:17:20
 */
@Entity
@Table(name = "TBL_PARAM_VALUE")
// 默认的缓存策略.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ParamValue extends IdEntity {

	private static final long serialVersionUID = 1376942996344004935L;

	private String paramKey;// 参数中文名称
	private String paramValue;// 参数描述
	
	private Param param;

	public ParamValue() {
	}
	
	public ParamValue(String paramKey, String paramValue) {
		super();
		this.paramKey = paramKey;
		this.paramValue = paramValue;
	}

	public String getParamKey() {
		return paramKey;
	}

	public void setParamKey(String paramKey) {
		this.paramKey = paramKey;
	}

	public String getParamValue() {
		return paramValue;
	}

	public void setParamValue(String paramValue) {
		this.paramValue = paramValue;
	}

	@ManyToOne
	@JoinColumn(name="param_id",nullable=false)
	@org.hibernate.annotations.ForeignKey(name="fk_param_value")
	@org.hibernate.annotations.Index(name="idx_fk_param_value")
	public Param getParam() {
		return param;
	}

	public void setParam(Param param) {
		this.param = param;
	}
}
